#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int bin_search(int arr[], int left, int right, int key);
int main()
{
	int left = 0;
	int key;
	int i = 0;
	int arr[10] = { 0 };
	int sz = sizeof(arr) / sizeof(arr[0]);
	int right = sz-1;
	scanf("%d %d", &arr[i], &key);
	bin_search(arr[i], key,right,left);
	return 0;
}

int bin_search(int arr[], int left, int right, int key)
{

	while (left < (left + right) / 2)
	{
		if (arr[left] == key)
		{
			printf("left");
			left++;
		}

		else
		{
			printf("-1");
		}
	}
	while (right > (left + right) / 2)
	{
		if (arr[right] == key)
		{
			printf("right");
			right--;
		}
		else
		{
			printf("-1");
		}
	}

	return 0;
}